package designpattern.factorypattern;


/**
 * @author hubb
 * @Date 2019/3/28 23:43
 */
public class ExportHtmlFactory extends ExportFactory {
    /**
     * @param type
     * @return
     */
    @Override
    public ExportFile factory(String type) {
        if ("standard".equals(type)) {
            return new ExportStandardHtmlFile();
        }else if("financial".equals(type)){

            return new ExportFinancialHtmlFile();

        }else{
            throw new RuntimeException("没有找到对象");
        }
    }

}
